package com.cosina.game.crystallight.ui.menu.transform;

import android.graphics.Canvas;

public class RotateTransform extends Transform {

	final int rotateSpeed = 20;
	public int rotate = 0;
	
	@Override
	public void doT(Canvas canvas) {
		if(this.rotate< 0){
			canvas.rotate(-this.rotate,this.occpuy.left,this.occpuy.top);
		}
	}

	@Override
	public void undoT(Canvas canvas) {
		if(this.rotate < 0){
			canvas.rotate(this.rotate,this.occpuy.left,this.occpuy.top);
		}
	}
	
	@Override
	public void update(){
		if(rotate <= 0)
			rotate += rotateSpeed;
		else
			rotate = 0;
	}
}
